package com.shen.demo.excel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.Map;

public class ExcelListener  extends AnalysisEventListener<DemoDataRead> {

    //一行一行读取
    @Override
    public void invoke(DemoDataRead demoDataRead, AnalysisContext analysisContext) {
        System.out.println("data"+demoDataRead);
    }
    //读取表头
    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        System.out.println("表头****"+headMap);
    }
    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
